package org.cn.lennon.mybatis.config;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * mapper的注册表
 * 
 * @author lennon
 *
 */
public class MapperRegister {

	private Map<String, MapperStatment> sqlMapperStatmentMap = new ConcurrentHashMap<String, MapperStatment>();

	public void put(String key, MapperStatment mapperStatment) {
		sqlMapperStatmentMap.put(key, mapperStatment);
	}

	public MapperStatment getSqlMapperStatment(String key) {
		return sqlMapperStatmentMap.get(key);
	}

	public static MapperRegister getMapperRegister() {
		return new MapperRegister();
	}

	private MapperRegister() {
		
	}
}
